<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<base href="http://localhost:8080/apprentice_cms/application/modules/news/views/scripts/article/">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />	

<html>
<head>
>>>>>>> .r91
	<?php echo $this->headTitle('Add new article') ?>	
	<?php 
		$this->headLink()->appendStylesheet($this->url.'skin/admin/default/adminNews.css');
		$this->headLink()->appendStylesheet($this->url.'public/css/editor.css');
		$this->headScript()->appendFile($this->url.'public/js/editor.js'); 
	?>
</head>
<body>
	<div class="form">
	<form action="" method="post" name="addArticleForm" id="addArticleForm" enctype="multipart/form-data">
	<div>
		<label>Main title: </label>
		<input type="text" name="title" id="title" style="width: 440px" value="<?php echo $this->newsTitle?>" />
	</div>
	
	<hr />
	
	<div>
		<label>Sub title: &nbsp;</label>
		<input type="text" name="subTitle" id="subTitle" style="width: 440px" />
	</div>
	
	<hr />
	
	<div>
		<label>Slug: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
		<input type="text" name="slug" id="slug" style="width: 440px" />
	</div>
	
	<hr />
	
	<span id="editorDescription">Waiting for loading editor...</span>
	
	<script language="javascript">
		
		ed = new Editor("ed", "d", "description", "editorDescription", 400, 300,"<?php echo $this->newsDescription?>");
		
		ed.render();
		
	</script>
	
	<hr />
	
	<span id="editorContent">Waiting for loading editor...</span>
	<script language="javascript">
		ec = new Editor("ec", "c", "content", "editorContent", 400, 800,"<?php echo $this->newsContent?>");
		ec.render();
	</script>
	
	<hr />
	
	<div>
		<label>Author: &nbsp;&nbsp;&nbsp;</label>
		<input type="text" name="author" id="author" style="width: 440px" value="<?php echo $this->newsAuthor?>" />
	</div>
	
	<hr />
	
	<div>
		<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
		
		<?php 
			if($this->newsisComment == "0")
			{
				echo "<input type=\"checkbox\" name=\"allowComment\" id=\"allowComment\" value=\"1\" /> Allow user to comment article";
			}
			else 
			{
				echo "<input type=\"checkbox\" name=\"allowComment\" id=\"allowComment\" value=\"1\" checked=\"checked\" /> Allow user to comment article";				
			}
		?>
	</div>
	
	<hr />
	
	<div>
		<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
		
		<?php 
			if($this->newsisHot == "0")
			{
				echo "<input type=\"checkbox\" name=\"hotArticle\" id=\"hotArticle\" value=\"1\" /> Hot article";
			}
			else 
			{
				echo "<input type=\"checkbox\" name=\"hotArticle\" id=\"hotArticle\" value=\"1\" checked=\"checked\" /> Hot article";				
			}
		?>
	</div>
	
	<hr />
	
	<div>
		<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
		<input type="submit" name="save" value="Save" onclick="getData('description', 'd'); getData('content', 'c');" />
	</div>
</form>
</div>
</body>
</html>	
